﻿using Dapper;
using HR.IServices.PengIService;
using HR.Models.PengModels;
using System.Data.SqlClient;

namespace HR.Services.PengService
{
    public class RenLiZiYuanServices : IRenLiZiYuanServices
    {
        private readonly IConfiguration conf;
        private readonly string? conStr;

        public RenLiZiYuanServices(IConfiguration conf)
        {
            this.conf = conf;
            conStr = this.conf["ConnectionStrings"];
        }
        public Task<int> RenLiAdd(RenLiZiYuan renLiZiYuan)
        {
            return Task.Run(async () =>
            {
                using (SqlConnection con = new SqlConnection(conStr))
                {
                    return con.Execute($"insert into human_file() values ()");
                }
            });
        }
    }
}
